home *** CD-ROM | disk | FTP | other *** search
- class GameObject extends MovieClip
- {
- var engine;
- var from;
- var n = 0;
- var xdir = 1;
- static var MAX_ITEMS = 10000;
- static var GLOW_FILTER = new flash.filters.GlowFilter(16777215,1,5,5,10,1,false,false);
- function GameObject()
- {
- super();
- }
- function init(e)
- {
- this.engine = e;
- this.from = this.engine.gameItemScaleTarget;
- this.n = this.engine.indQueue.shift();
- }
- function update()
- {
- this.convertScale();
- }
- function getTargetDepth()
- {
- return this._y * GameObject.MAX_ITEMS + this.n;
- }
- function convertScale()
- {
- var _loc5_ = this.from._xscale / 100;
- var _loc4_ = this.from._yscale / 100;
- var _loc7_ = 1;
- var _loc6_ = 1;
- var _loc3_ = this.from;
- while(_loc3_ != _root)
- {
- _loc3_ = _loc3_._parent;
- _loc5_ *= _loc3_._xscale / 100;
- _loc4_ *= _loc3_._yscale / 100;
- }
- _loc3_ = this;
- while(_loc3_ != _root)
- {
- _loc3_ = _loc3_._parent;
- _loc7_ *= _loc3_._xscale / 100;
- _loc6_ *= _loc3_._yscale / 100;
- }
- this._xscale = _loc5_ / _loc7_ * 100 * this.xdir;
- this._yscale = _loc4_ / _loc6_ * 100;
- }
- function die()
- {
- var _loc2_ = 0;
- while(this._parent.getInstanceAtDepth(_loc2_))
- {
- _loc2_ = _loc2_ + 1;
- }
- this.swapDepths(_loc2_);
- this.removeMovieClip();
- }
- }
-